<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="../test/day1.js"></script>

<script>
    var a;
    var b;
    document.write(a);
    a = 1;
    b = 2;
    document.write(a);
    document.write(b);
    var a = 3,b = 4;
    document.write(a);
    document.write(b);
    a = 3,b = "测试1";

    document.write(a);
    document.write(b);

    const PI = 3.14;
    const P = PI * 2;


    var b1 = true;
    var b2 = false;
    var b3 = -111;
    var b4 = 11.11;
    console.info(b3)


    var url = "/login?username="+b3+"";

    var name = 'zhang"';
    var usernmae = "zhang shan";
    var usernmae = "zhang ' shan";

    document.write("<br>");

    var name1 = 'zhang\'';
    var name2 = "zhang san \n work on";
    console.info(name2);


    var data = null;
    var num3;
    var boolean = true;
    var num1 = 12,num2 = '34',sum=0;
    sum = num1 + Number(num2);
    document.write(typeof data);
    document.write(typeof num3);
    document.write(typeof num1);
    document.write(typeof num2);
    document.write(typeof sum);
    document.write("<br>");
    document.write(Object.prototype.toString.call(num1))
    document.write("<br>");


    console.log("this\tisnanchang");

    document.write(Boolean("sfds"));
    document.write(Boolean(0));
    /* var con = prompt();
    if (Boolean(con)) {
      document.write('已输入内容');
    } else {
      document.write('无输入内容');
    }*/
    function color(pars) {
        if(pars == "1"){
            //document.bgColor =  "red";
            document.getElementById("bd1").style.background="red";
        }else if(pars =="2"){
            document.getElementById("bd1").style.background="yellow";
        }else if(pars =="3"){
            document.getElementById("bd1").style.background="blue";
        }
    }
</script>
<body id="bd1">
<input type="button" value="红色" onclick="color(1)">
<input type="button" value="黄色" onclick="color(2)">
<input type="button" value="蓝色" onclick="color(3)">
</body>
</html>